package cn.bonoon.entities.plugins;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import cn.bonoon.kernel.support.entities.AbstractPersistable;

/**
 * <pre>
 * 快捷菜单
 * 
 * 用户可以自定义快捷菜单，并且通过系统菜单配置或在layout的某个地方（由模板定义来决定）来显示快捷菜单。
 * 并且快捷菜单只对菜单项有效，不能定义频道或子系统；
 * 快捷菜单可以定义为跨系统或不跨系统;
 * 也可以重新命名菜单；同一个菜单可以定义为多个快捷菜单，如果定义了多个，则系统也会多次显示该菜单
 * </pre>
 * @author jackson
 *
 */
@Entity
@Table(name = "t_shortcutmenu")
public class ShortcutMenuEntity extends AbstractPersistable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -2827446346157441865L;
	@Column(name = "C_ORDINAL")
	private int ordinal;
	/**
	 * 子系统的ID
	 */
	@Column(name = "C_MODULEID")
	private String moduleId;
	/**
	 * 快捷菜单的ID
	 */
	@Column(name = "C_MENUID")
	private String menuId;
	/**
	 * 重命名菜单
	 */
	@Column(name = "C_NAME")
	private String name;
	/**
	 * 所属者
	 */
	@Column(name = "C_OWNER")
	private Long owner;
	/**
	 * <pre>
	 * 快捷菜单的类型：
	 * 0.系统首页
	 * 1.子系统首页
	 * </pre>
	 */
	@Column(name = "C_TYPE")
	private int type; 

	/**
	 * 创建的时间
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "C_CREATEAT", nullable = false)
	private Date createAt;

	public int getOrdinal() {
		return ordinal;
	}

	public void setOrdinal(int ordinal) {
		this.ordinal = ordinal;
	}

	public String getModuleId() {
		return moduleId;
	}

	public void setModuleId(String moduleId) {
		this.moduleId = moduleId;
	}

	public String getMenuId() {
		return menuId;
	}

	public void setMenuId(String menuId) {
		this.menuId = menuId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getOwner() {
		return owner;
	}

	public void setOwner(Long owner) {
		this.owner = owner;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public Date getCreateAt() {
		return createAt;
	}

	public void setCreateAt(Date createAt) {
		this.createAt = createAt;
	}
}
